package Combination;

/**
 * @author duanzhizhou
 * @date 2024/10/17
 */
public class client {
    
    public static void main(String[] args) {
        Company root = new ConcreteCompany("集团总部");
        root.add(new HRDepartment("集团人力部"));
        root.add(new FinanceDepartment("集团财务部"));
        Company shanghai = new ConcreteCompany("上海分公司");
        root.add(shanghai);
        shanghai.add(new FinanceDepartment("上海财务部"));
        Company guangzhou = new ConcreteCompany("广州办事处");
        root.add(guangzhou);
        guangzhou.add(new HRDepartment("广州人力部"));
        root.show(1);
        root.func();
    }
    
}
